FROM openjdk:8-jre
ADD hxrfid-xxl-job-admin.jar /job.jar
RUN echo Asia/shanghai > /etc/timezone
RUN cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
ENV JAVA_OPTS=""
ENV DB_URL=""
ENV DB_USER=""
ENV DB_PWD=""
ENV REDIS_HOST=""
ENV REDIS_PORT=""
ENV REDIS_PWD=""
CMD java ${JAVA_OPTS} -jar job.jar --spring.profiles.active=prod --spring.datasource.url=${DB_URL} --spring.datasource.username=${DB_USER} --spring.datasource.password=${DB_PWD} --spring.redis.host=${REDIS_HOST} --spring.redis.port=${REDIS_PORT} --spring.redis.password=${REDIS_PWD}
EXPOSE 9100
